<div class="form-modal" [ngClass]="className + (fontColorTheme ? ' theme-'+fontColorTheme : '')">
  <ng-content select="[name=form-child-before]"></ng-content>
  <div *ngIf="isRenderForm != false">
    <div class="form-rows" *ngFor="let data of modelData; let idx = index;"
      [ngClass]="(isLabelAuto ? 'auto ' : '')+(rowSpace ? (rowSpace + ' ') : '')+(data.type == 'split-line' ? 'split-line-row ' : '')+data.rowType+' '+data.type">
      <label class="rows-lab"
        *ngIf="isShowLabel != false && data.isShowLabel != false && data.type != 'split-line'">{{data.text ? data.text + '：' : ''}}</label>
      <span class="rows-inp"
        [ngClass]="((data.type == 'checkbox-group' || data.type=='radiobox-group' || data.type == 'text') ? 'text' : '') + ((isShowLabel == false || data.isShowLabel == false || data.type == 'split-line') ? ' full' : '')">
        <!-- 备注文本 -->
        <label [class]="data.type"
          *ngIf="data.type == 'remark' || data.type == 'desc' || data.type == 'remark-text'">{{data.value || data.remark}}</label>

        <!-- 上传 -->
        <nag-file-uploader #fileUploader style="display:none"
          *ngIf="(data.type == 'upload-image' || data.type == 'upload-file' || data.type == 'upload-file-progress')"
          [autoUpload]="true" [fileHost]="fileHost" [flowFiles]="status.flowFiles" [multiple]="false"
          (onStart)="fileUploadStart($event, data)" (onSuccess)="fileUploadSuccess($event, data)"></nag-file-uploader>
        <!-- 图片上传(按钮样式) -->
        <div class="upload-image-wrap" *ngIf="data.type == 'upload-image'">
          <div class="upload-image">
            <label class="lab-tip">点击上传</label>
            <span class="thumb-wrap" *ngIf="data.value">
              <img [src]="data.value" class="upload-thumb" />
            </span>
            <input class="inp-upload" type="file" [disabled]="disabledForm" (change)="uploadFileChange($event, data)" />
          </div>
        </div>
        <!-- 文件上传(按钮样式) -->
        <div class="upload-file-wrap min" *ngIf="data.type == 'upload-file'">
          <div class="upload-file">
            <span class="file-name">{{(status.fileNameStatus == true && data.value) ? data.value : '选择本地文件'}}</span>
            <button nz-button nzType="primary" [nzSize]="'small'" class="btn-file-choose" [disabled]="disabledForm">
              <i nz-icon type="plus"></i>选择
            </button>
            <input type="file"
              accept="image/gif,image/jpeg,image/jpg,image/png,application/vnd.ms-works,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/pdf,text/plain,video/mp4,application/vnd.ms-powerpoint,application/vnd.openxmlformats-officedocument.presentationml.presentation,application/x-zip-compressed"
              class="opacity-file" (change)="uploadFileChange($event, data)" [disabled]="disabledForm" />
          </div>
        </div>
        <!-- 文件上传+进度(按钮样式) -->
        <div class="upload-file-progress-wrap" *ngIf="data.type == 'upload-file-progress'">
          <div class="content-item">
            <button nz-button nzType="default" [disabled]="disabledForm">选择文件并上传</button>
            <input type="file" class="upload-file-inp" [disabled]="disabledForm"
              (change)="uploadFileChange($event, data)" />

            <label class="value-text" *ngIf="data.valueText">{{data.valueText}}</label>
          </div>
          <div class="content-item full" *ngIf="data.value">
            <div class="upload-file-title">
              <i nz-icon type="paper-clip" theme="outline"></i>
              {{data.value}}
              <a href="javascript:;" class="btn-del-file" title="删除" (click)="removeFile(data)">X</a>
            </div>
            <div class="upload-file-progress">
              <div class="upload-file-name">
                {{data.value}}
                （上传进度{{data.progress || 0}}%）
              </div>
              <nz-progress [nzPercent]="data.progress || 0" [nzStatus]="data.progress < 100 ? 'active' : 'success'"
                [nzShowInfo]="false"></nz-progress>
            </div>
          </div>
        </div>
        <!-- 必填标识 -->
        <i class="require" [ngClass]="data.requireIconType" *ngIf="data.require && data.type != 'text'">*</i>
        <!-- 分割线 -->
        <i class="split-line" *ngIf="data.type == 'split-line'"></i>
      </span>
    </div>
  </div>

  <ng-content select="[name=form-child]"></ng-content>
</div>